<?php
	require '../../include/library.inc.php';
	require '../../include/admin_login.inc.php';
	
	$new_id = intval($_GET['new_id']);
	$publish = intval($_GET['publish']);
	
	if($new_id) {
		$sql = "UPDATE 
				  news
				SET
				  published = $publish
				WHERE
				  new_id = $new_id 
				 ";
		query($sql);
	}
  
	redirect($_SERVER['HTTP_REFERER']);
?>